"""
    自定义异常
"""

class MyException(Exception):
    def __init__(self, value):
        self.value = value

try:
    raise MyException("这是自定义异常")
except MyException as e:
    print(f"发生了一场{e}")

